
function paginationCountInfo(){
	var visitGuid=$("#visitGuid").val();
	var basePath = $("#basePath").val();
	var filepages=$("#filePage div.a4-endwise");
	$("#totalFileCount").html(filepages.length);
	if(filepages.length > 0){
		$("#print-a").show();
	}else{
		$("#print-a").hide();
	}
}





function sort_li(a, b){
	var imageSortIndexB =$(b).attr('image-sort-index');
	var imageSortIndexA =$(a).attr('image-sort-index');
	var pageTypeSortIndexB=$(b).attr('page-type-sort-index');
	var pageTypeSortIndexA=$(a).attr('page-type-sort-index');
	
	if((pageTypeSortIndexB == pageTypeSortIndexA)){
		if(checkNumber(imageSortIndexB) && checkNumber(imageSortIndexA)){
			 return Number(imageSortIndexB) < Number(imageSortIndexA) ? 1 : -1;
		}
	}
    return Number($(b).attr('page-type-sort-index')) < Number($(a).attr('page-type-sort-index')) ? 1 : -1;    //升序排列
}

function initPage(){
	paginationCountInfo();

}

function deleteImg(obj){
	var basePath = $("#basePath").val();
	if(!confirm("确定要移除吗？"))
	{
		return false;
	}
	var $this = $(obj);
   	
	$this.parent().remove();
	paginationCountInfo();
}


